<template>
  <div class="all">
    <van-tabbar v-model="active" active-color="#ee0a24" inactive-color="#000" route>
      <van-tabbar-item
        v-for="(item, index) in list"
        :key="index"
        :icon= item.isName
        :to="item.path"
      >
      <!--:icon="item.id === 1 ? 'jingxuan iconfont': item.isName" -->
        {{item.msg}}
      </van-tabbar-item>
    </van-tabbar>
  <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: 'AllView',
  data () {
    return {
      list: [
        { id: 1, isName: 'home-o', msg: '精选', path: '/home' },
        { id: 2, isName: 'shop-o', msg: '分类', path: '/items' },
        { id: 3, isName: 'shopping-cart-o', msg: '购物车', path: '/shopping' },
        { id: 4, isName: 'friends-o', msg: '我的', path: '/me' }
      ],
      active: ''
    }
  },
  components: {},
  methods: {
    changePath (item) {
      this.$router.push(item.path)
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
